Remove old unused watchlist cache (leftover from old schema)
authorRob Church <robchurch@users.mediawiki.org>
Sun, 24 Dec 2006 08:58:05 +0000 (08:58 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Sun, 24 Dec 2006 08:58:05 +0000 (08:58 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/SpecialWatchlist.php

index 70be248..f727b8b 100644 (file)
@@ -405,6 +405,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 6853) Use a checkbox on the installer form to indicate that a superuser
   account should be used; this is clearer than the old check which relied on
   the password never being an obscure value
+* Remove old unused watchlist cache, which was a leftover from the old schema
+  where watchlists were more expensive to generate
 
 == Languages updated ==
 
index 3778bc1..49e536d 100644 (file)
@@ -1188,10 +1188,6 @@ $wgMiserMode = false;
 $wgDisableQueryPages = false;
 /** Number of rows to cache in 'querycache' table when miser mode is on */
 $wgQueryCacheLimit = 1000;
-/** Generate a watchlist once every hour or so */
-$wgUseWatchlistCache = false;
-/** The hour or so mentioned above */
-$wgWLCacheTimeout = 3600;
 /** Number of links to a page required before it is deemed "wanted" */
 $wgWantedPagesThreshold = 1;
 /** Enable slow parser functions */
index f149bcb..1f75a8d 100644 (file)
@@ -12,12 +12,11 @@ require_once( 'SpecialRecentchanges.php' );
 
 /**
  * Constructor
- * @todo Document $par parameter.
- * @param $par String: FIXME
+ *
+ * @param $par Parameter passed to the page
  */
 function wfSpecialWatchlist( $par ) {
        global $wgUser, $wgOut, $wgLang, $wgMemc, $wgRequest, $wgContLang;
-       global $wgUseWatchlistCache, $wgWLCacheTimeout;
        global $wgRCShowWatchingUsers, $wgEnotifWatchlist, $wgShowUpdatedMarker;
        global $wgEnotifWatchlist;
        $fname = 'wfSpecialWatchlist';
@@ -102,16 +101,6 @@ function wfSpecialWatchlist( $par ) {
                $wgOut->addHTML( "</p>\n<p>" . wfMsg( 'wldone' ) . "</p>\n" );
        }
 
-       if ( $wgUseWatchlistCache ) {
-               $memckey = wfMemcKey( 'watchlist', 'id', $wgUser->getId() );
-               $cache_s = @$wgMemc->get( $memckey );
-               if( $cache_s ){
-                       $wgOut->addWikiText( wfMsg('wlsaved') );
-                       $wgOut->addHTML( $cache_s );
-                       return;
-               }
-       }
-
        $dbr =& wfGetDB( DB_SLAVE );
        list( $page, $watchlist, $recentchanges ) = $dbr->tableNamesN( 'page', 'watchlist', 'recentchanges' );
 
@@ -384,10 +373,6 @@ function wfSpecialWatchlist( $par ) {
        $dbr->freeResult( $res );
        $wgOut->addHTML( $s );
 
-       if ( $wgUseWatchlistCache ) {
-               $wgMemc->set( $memckey, $s, $wgWLCacheTimeout);
-       }
-
 }
 
 function wlHoursLink( $h, $page, $options = array() ) {